package com.mango.banana;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.mango.banner.widget.ImageLoader.ImageLoaderInterface;

/**
 * @author dengjiajin
 * @date 2018-11-27
 */
public class GlideImageLoader implements ImageLoaderInterface<ImageView> {

    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
        Glide.with(context.getApplicationContext())
                .load(path)
                .into(imageView);
    }

    @Override
    public ImageView createImageView(Context context) {
        ImageView imageView = new ImageView(context);
        return imageView;
    }
}
